function Get-InsightParameters {
    [CmdletBinding()]
    [OutputType('Parameters')]
    param ([Parameter(Mandatory = $false)][Parameters]$Parameters = (New-LSParameters))

    # Get LS Insight placement (on-prem or in Azure).
    $Parameters.LSInsight.Placement = Get-InsightPlacement -CentralPlacement $Parameters.LSCentral.Placement -InsightPlacement $Parameters.LSInsight.Placement -ConfirmAll $Parameters.ConfirmAll

    # Get placement related parameters.
    if ($Parameters.LSInsight.Placement -eq 'In_Azure') {
        Get-InsightCloudParameters -Parameters $Parameters
    } else {
        Get-InsightOnPremParameters -Parameters $Parameters
    }

    # Get all the available existing resources.
    $existing = Get-ExistingResources -ResourceGroup $Parameters.Azure.ResourceGroup

    # Ask for ADF v2 name.
    if($Parameters.LSInsight.Database.UseExisting -eq 'True')
    {
        $blocklist = @()
    }
    else {
        $blocklist = $existing.ADFv2s.ResourceName
    }

    $Parameters.LSInsight.ADFv2.Name = Get-NewAzureDataFactoryName -Blocklist $blocklist -ADFv2Name $Parameters.LSInsight.ADFv2.Name -ConfirmAll $Parameters.ConfirmAll

    # Ask for location for the new Azure resources.
    $Parameters.LSInsight.Location = Get-AzureLocation -Location $Parameters.LSInsight.Location -ResourceGroup $Parameters.Azure.ResourceGroup -ConfirmAll $Parameters.ConfirmAll
    
    # Get ADFv2 trigger start date.
    $tomorrow1oClock = (([datetime]::Today).AddDays(1)).AddHours(1)
    $Parameters.LSInsight.ADFv2.TriggerStart = $tomorrow1oClock

    # Confirm parameters.
    $confirmed = Confirm-InsightParameters -LSInsight $Parameters.LSInsight
    
    if (!$confirmed) {
        return (Get-InsightParameters -Parameters $Parameters)
    }

    # Store 'Parameters' object in the project folder.
    if ($Parameters.LSInsight.ParametersOutFilePath) {
        Write-LSParameters -Parameters $Parameters -File $Parameters.LSInsight.ParametersOutFilePath
    }

    return $Parameters
}